/*
 * ldisc.h: defines the Ldisc data structure used by ldisc.c and
 * ldiscucs.c. (Unfortunately it was necessary to split the ldisc
 * module in two, to avoid unnecessarily linking in the Unicode
 * stuff in tools that don't require it.)
 */

#ifndef SSHLIB_LDISC_H
#define SSHLIB_LDISC_H

typedef struct ldisc_tag {
    Terminal *term;
    Backend *back;
    Config *cfg;
    void *backhandle;

    char *buf;
    int buflen, bufsiz, quotenext;
} *Ldisc;

void *ldisc_create(Config *, Terminal *, Backend *, void *);
void ldisc_free(void *);
void ldisc_send(void *handle, char *buf, int len, int interactive, int localid);
void lpage_send(void *handle,
		int codepage, char *buf, int len, int interactive);
void luni_send(void *handle, wchar_t * widebuf, int len, int interactive);

enum {
    /*
     * Line discipline options which the backend might try to control.
     */
    LD_EDIT,			       /* local line editing */
    LD_ECHO			       /* local echo */
};


#endif /* PUTTY_LDISC_H */
